fix layout
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -16,7 +16,7 @@ my-blog/static/index.html
|
|||||||
my-blog/templates/oauth-assets.html
|
my-blog/templates/oauth-assets.html
|
||||||
cloudflared-config.yml
|
cloudflared-config.yml
|
||||||
.config
|
.config
|
||||||
atproto
|
repos
|
||||||
oauth_old
|
oauth_old
|
||||||
oauth_example
|
oauth_example
|
||||||
my-blog/static/oauth/assets/comment-atproto*
|
my-blog/static/oauth/assets/comment-atproto*
|
||||||
|
@ -4,7 +4,7 @@ import ChatRecordList from './ChatRecordList.jsx'
|
|||||||
import LoadingSkeleton from './LoadingSkeleton.jsx'
|
import LoadingSkeleton from './LoadingSkeleton.jsx'
|
||||||
|
|
||||||
export default function RecordTabs({ langRecords, commentRecords, userComments, chatRecords, userChatRecords, userChatLoading, baseRecords, apiConfig, pageContext, user = null, agent = null, onRecordDeleted = null }) {
|
export default function RecordTabs({ langRecords, commentRecords, userComments, chatRecords, userChatRecords, userChatLoading, baseRecords, apiConfig, pageContext, user = null, agent = null, onRecordDeleted = null }) {
|
||||||
const [activeTab, setActiveTab] = useState('lang')
|
const [activeTab, setActiveTab] = useState('comment')
|
||||||
|
|
||||||
// Filter records based on page context
|
// Filter records based on page context
|
||||||
const filterRecords = (records) => {
|
const filterRecords = (records) => {
|
||||||
@ -36,18 +36,18 @@ export default function RecordTabs({ langRecords, commentRecords, userComments,
|
|||||||
return (
|
return (
|
||||||
<div className="record-tabs">
|
<div className="record-tabs">
|
||||||
<div className="tab-header">
|
<div className="tab-header">
|
||||||
<button
|
|
||||||
className={`tab-btn ${activeTab === 'lang' ? 'active' : ''}`}
|
|
||||||
onClick={() => setActiveTab('lang')}
|
|
||||||
>
|
|
||||||
en ({filteredLangRecords.length})
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
className={`tab-btn ${activeTab === 'comment' ? 'active' : ''}`}
|
className={`tab-btn ${activeTab === 'comment' ? 'active' : ''}`}
|
||||||
onClick={() => setActiveTab('comment')}
|
onClick={() => setActiveTab('comment')}
|
||||||
>
|
>
|
||||||
feedback ({filteredCommentRecords.length})
|
feedback ({filteredCommentRecords.length})
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className={`tab-btn ${activeTab === 'lang' ? 'active' : ''}`}
|
||||||
|
onClick={() => setActiveTab('lang')}
|
||||||
|
>
|
||||||
|
en ({filteredLangRecords.length})
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`tab-btn ${activeTab === 'collection' ? 'active' : ''}`}
|
className={`tab-btn ${activeTab === 'collection' ? 'active' : ''}`}
|
||||||
onClick={() => setActiveTab('collection')}
|
onClick={() => setActiveTab('collection')}
|
||||||
|
Reference in New Issue
Block a user