Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zenghongtu committed Feb 22, 2023
1 parent d3daae4 commit d5e4ab3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/user-info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const UserInfo = ({
style={{ ...style, fontWeight: '800' }}
hasBorder={true}
// arrow="right"
title="Support"
title="Star Support"
onClick={handleSupport}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/activity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useRequestWIthMore from '../../hooks/useRequestWIthMore';
const Activity = () => {
const {
params: { name },
} = useRouter();
} = useRouter<{ name: string }>();

const [eventsData, hasMore, refresh, getMoreData] =
useRequestWIthMore<IUserReceivedEvent>(name, getUserEvents);
Expand Down
14 changes: 8 additions & 6 deletions src/pages/developer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ import {
import { Block } from '@tarojs/components';
import Taro, { useRouter, useShareAppMessage } from '@tarojs/taro';
import { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';

const Developer = () => {
const {
params: { name },
} = useRouter();
const username = name!;
} = useRouter<{ name: string }>();
const username = useSelector<any, any>((state) => state.user.username);

const {
data: userInfo,
isError,
isLoading,
} = useUsersGetByUsername({
pathParams: { username },
pathParams: { username: name },
});

const [isFollowing, setIsFollowing] = useState(false);

useUsersCheckPersonIsFollowedByAuthenticated(
{
pathParams: { username },
pathParams: { username: name },
},
{
enabled: !!username,
Expand All @@ -49,13 +51,13 @@ const Developer = () => {

const handleFollowBtnClick = () => {
if (isFollowing) {
unFollow({ pathParams: { username } }).then((data) => {
unFollow({ pathParams: { username: name } }).then((data) => {
if (!data && data !== null) {
setIsFollowing(false);
}
});
} else {
updateFollow({ pathParams: { username } }).then((data) => {
updateFollow({ pathParams: { username: name } }).then((data) => {
if (!data && data !== null) {
setIsFollowing(true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const Login = () => {
<Text
onClick={async () => {
await copyText(
'https://github.com/settings/tokens/new?scopes=repo,workflow,notifications,user,gist,project&description=Github%20Pro',
'https://github.com/settings/tokens/new?scopes=repo%2Cworkflow%2Cnotifications%2Cuser%2Cgist%2Cproject&description=Github%20Pro',
);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/repos/readme/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.wrap {
height: 800px;
max-height: 800px;
overflow: hidden;
position: relative;
padding-bottom: 150px;
Expand Down
5 changes: 4 additions & 1 deletion src/pages/repos/readme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const Readme = ({ owner, repo, full_name }, ref) => {
return (
<SkeletonCard isError={isError} isLoading={isFetching}>
{data && (
<View className={styles.wrap} style={showAll ? { height: 'auto' } : {}}>
<View
className={styles.wrap}
style={showAll ? { maxHeight: 'fit-content' } : {}}
>
<Markdown md={data as any as string} full_name={full_name}></Markdown>
<AtButton
onClick={() => {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/search/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
overflow: hidden;
z-index: 2;
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const Search = () => {
<View className={styles.wrap}>
<View className={styles['search-wrap']}>
<AtSearchBar
showActionButton
onConfirm={handleConfirm}
placeholder="search"
actionName="Search"
Expand Down

0 comments on commit d5e4ab3

Please sign in to comment.