Skip to content

Commit f018fa9

Browse files
committed
fix static errors for self closed tags and empty fragments
1 parent 853933a commit f018fa9

File tree

7 files changed

+23
-25
lines changed

7 files changed

+23
-25
lines changed

app/Home.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ function MainView(props: { queryRef: PreloadedQuery<HomeQuery> }) {
6363

6464
return (
6565
<Layout sidebarContentLeft={leftSidebar}>
66-
<>
67-
<Feed root={data} />
68-
</>
66+
<Feed root={data} />
6967
</Layout>
7068
)
7169
}

app/head.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default function Head() {
22
return (
33
<>
4-
<title></title>
4+
<title>OpenSourcer</title>
55
<meta content="width=device-width, initial-scale=1" name="viewport" />
66
<link rel="icon" href="/favicon.ico" />
77
</>

app/issues/Issues.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ export default function IssuesContainer({
5656
export function Issues(props: { queryRef: PreloadedQuery<IssuesQuery> }) {
5757
const data = usePreloadedQuery(IssuesQuery, props.queryRef)
5858
if (!data.viewer) {
59-
return <></>
59+
return <>User Not Found</>
6060
}
6161
return (
6262
<div>
6363
<Layout
64-
sidebarContentRight={<></>}
64+
sidebarContentRight={<>UserPage right sidebar</>}
6565
sidebarContentLeft={
6666
<Card>
6767
<UserDetails user={data.viewer} />

app/story/[id]/Story.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,6 @@ type StoryProps = {
4040
cookies: string
4141
}
4242

43-
export default function StoryContainer({
44-
preloadedQuery,
45-
cookies,
46-
}: StoryProps) {
47-
const environment = getCurrentEnvironment(cookies)
48-
const queryRef = useSerializablePreloadedQuery(environment, preloadedQuery)
49-
return (
50-
<RelayEnvironmentProvider environment={environment as Environment}>
51-
<Suspense fallback="Loading...">
52-
<Story queryRef={queryRef} />
53-
</Suspense>
54-
</RelayEnvironmentProvider>
55-
)
56-
}
57-
5843
const Story = (props: { queryRef: PreloadedQuery<StoryQuery> }) => {
5944
const data = usePreloadedQuery(StoryQuery, props.queryRef)
6045
return (
@@ -75,3 +60,18 @@ const Story = (props: { queryRef: PreloadedQuery<StoryQuery> }) => {
7560
</div>
7661
)
7762
}
63+
64+
export default function StoryContainer({
65+
preloadedQuery,
66+
cookies,
67+
}: StoryProps) {
68+
const environment = getCurrentEnvironment(cookies)
69+
const queryRef = useSerializablePreloadedQuery(environment, preloadedQuery)
70+
return (
71+
<RelayEnvironmentProvider environment={environment as Environment}>
72+
<Suspense fallback="Loading...">
73+
<Story queryRef={queryRef} />
74+
</Suspense>
75+
</RelayEnvironmentProvider>
76+
)
77+
}

app/user/[handle]/UserPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export default function UserContainer({ preloadedQuery, cookies }: StoryProps) {
5151
function User(props: { queryRef: PreloadedQuery<UserPageQuery> }) {
5252
const data = usePreloadedQuery(UserQuery, props.queryRef)
5353
if (!data.user) {
54-
return <></>
54+
return <>User Not Found</>
5555
}
5656
return (
5757
<div>
5858
<Layout
59-
sidebarContentRight={<></>}
59+
sidebarContentRight={<>UserPage right sidebar</>}
6060
sidebarContentLeft={
6161
<Card>
6262
<UserDetails user={data.user} />

src/components/feed/StoryPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
3838
{data.thumbnail ? (
3939
<img className="cover-image" src={data.thumbnail} alt="" />
4040
) : (
41-
<div className="image-placeholder bg-gray-100 dark:bg-dark-500"></div>
41+
<div className="image-placeholder bg-gray-100 dark:bg-dark-500" />
4242
)}
4343
</div>
4444
<div className="px-4 pb-4">

src/components/navbar/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Navbar({ isDrawerOpen, setIsDrawerOpen }: NavbarProps) {
1919
<nav className="fixed top-0 left-0 right-0 z-10 w-full h-16 bg-white dark:bg-dark-700 p-3 shadow-sm">
2020
<div className="container m-auto flex justify-between">
2121
<Link href="/">
22-
<div className="logo w-10 h-10"></div>
22+
<div className="logo w-10 h-10" />
2323
</Link>
2424
<div className="space-x-4 flex">
2525
<ThemeButton />

0 commit comments

Comments
 (0)