fix layout

This commit is contained in:
2025-06-20 23:26:32 +09:00
parent b7e411e8b2
commit eef1fdad38
2 changed files with 8 additions and 8 deletions

2
.gitignore vendored
View File

@ -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*

View File

@ -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')}