Skip to content

Commit

Permalink
chore: path
Browse files Browse the repository at this point in the history
  • Loading branch information
lencx committed Nov 13, 2023
1 parent 266765f commit ac7f247
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gpthub.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Comments() {
repoId="R_kgDOKrn4Tw"
category="Comments"
categoryId="DIC_kwDOF1L2fM4B-hVS"
mapping="pathname"
mapping="url"
term="Welcome to GPTHub!"
reactionsEnabled="1"
emitMetadata="0"
Expand Down
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { HashRouter } from 'react-router-dom';
import { BrowserRouter } from 'react-router-dom';

import BaseLayout from '@/layouts/base';
import './index.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<HashRouter>
<BrowserRouter basename="/gpthub">
<BaseLayout />
</HashRouter>
</BrowserRouter>
</React.StrictMode>,
)
17 changes: 10 additions & 7 deletions src/views/GPTs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ export default function GPTs() {
onChange={handleSearch}
/>
</div>
{list.length === 0 && <div className="flex h-80 justify-center items-center text-4xl font-bold text-slate-500">No Data</div>}
<div className="grid gap-4 lg:grid-cols-3 md:grid-cols-2 grid-cols-1">
{list?.map((item) => {
if (!item.id) return null;
return <GPTCard key={item.id} {...item} />
})}
</div>
{list.length === 0 ? (
<div className="flex h-80 justify-center items-center text-4xl font-bold text-slate-500">No Data</div>
) : (
<div className="grid gap-4 lg:grid-cols-3 md:grid-cols-2 grid-cols-1">
{list?.map((item) => {
if (!item.id) return null;
return <GPTCard key={item.id} {...item} />
})}
</div>
)}
</div>
);
}
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import tsconfigPaths from 'vite-tsconfig-paths';

// https://vitejs.dev/config/
export default defineConfig({
base: '/gpthub',
plugins: [
tsconfigPaths(),
react(),
Expand Down

0 comments on commit ac7f247

Please sign in to comment.