Skip to content

Commit

Permalink
chore: add note
Browse files Browse the repository at this point in the history
  • Loading branch information
lencx committed Nov 11, 2023
1 parent 12a1f0e commit 2c21222
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

<a href="https://www.producthunt.com/posts/gpthub?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-gpthub" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=424710&theme=light" alt="GPTHub - Find&#0032;Top&#0032;Custom&#0032;GPT&#0032;&#0032;Start&#0032;at&#0032;GPTHub&#0033; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

> **Note:**\
> Please exercise caution when using data obtained from the internet. Ensure the protection of your personal information to avoid falling prey to scams.

## Features

- Supports light/dark theme mode
Expand Down
14 changes: 14 additions & 0 deletions src/components/GPTHubNote.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import clsx from 'clsx';

interface GPTHubNoteProps {
className?: string;
}

export default function GPTHubNote({ className }: GPTHubNoteProps) {
return (
<div className={clsx('alert alert-warning', className)}>
<svg xmlns="http://www.w3.org/2000/svg" className="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
<span>Please exercise caution when using data obtained from the internet. Ensure the protection of your personal information to avoid falling prey to scams.</span>
</div>
)
}
2 changes: 2 additions & 0 deletions src/views/GPTDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import dayjs from 'dayjs';
import { gptLink } from '@/utils';
import GPTTools from '@components/GPTTools';
import GPTPrompts from '@components/GPTPrompts';
import GPTHubNote from '@components/GPTHubNote';
import data from '@@/gpthub.json';

export default function GPTs() {
Expand All @@ -25,6 +26,7 @@ export default function GPTs() {
<span>By {gptInfo?.author || 'community builder'}</span>
<span className="text-sm text-slate-500/80 dark:text-slate-400/50">{dayjs(gptInfo.updated_at).format('YYYY/MM/DD')}</span>
</div>
<GPTHubNote className="mb-5" />
<GPTTools data={gptInfo} />
<div className="my-3">
<b className="text-teal-600 mr-3">Description:</b>
Expand Down
4 changes: 3 additions & 1 deletion src/views/GPTs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useCallback, useState } from 'react';
import { debounce } from 'lodash';

import GPTCard from '@components/GPTCard';
import GPTHubNote from '@components/GPTHubNote';
import gptsData from '@@/gpthub.json';

function createSearchRegex(searchTerm: string) {
Expand Down Expand Up @@ -35,7 +36,8 @@ export default function GPTs() {

return (
<div>
<div className="px-4 h-16 flex justify-between items-center mb-4 border-4 rounded-2xl dark:border-slate-600">
<GPTHubNote />
<div className="mt-4 px-4 h-16 flex justify-between items-center mb-4 border-4 rounded-2xl dark:border-slate-600">
<b>Total: {list.length}</b>
<input
className="input input-bordered input-sm"
Expand Down

0 comments on commit 2c21222

Please sign in to comment.