mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 03:19:40 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
76 lines
1.6 KiB
TypeScript
76 lines
1.6 KiB
TypeScript
import React from 'react';
|
|
import { View, Text } from 'react-native';
|
|
import { useTheme } from '~/features/theme/ThemeProvider';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
interface WeekdayChartProps {
|
|
data: { [key: string]: number };
|
|
maxEntries?: number;
|
|
title?: string;
|
|
}
|
|
|
|
/**
|
|
* Simple chart component for displaying weekday distribution
|
|
*/
|
|
const WeekdayChart: React.FC<WeekdayChartProps> = ({ data, maxEntries = 3, title }) => {
|
|
const { isDark } = useTheme();
|
|
const { t } = useTranslation();
|
|
const textColor = isDark ? '#FFFFFF' : '#000000';
|
|
const textSecondaryColor = isDark ? '#CCCCCC' : '#666666';
|
|
const defaultTitle = t('statistics.recordings_per_weekday');
|
|
|
|
const sortedEntries = Object.entries(data)
|
|
.sort(([, a], [, b]) => b - a)
|
|
.slice(0, maxEntries);
|
|
|
|
return (
|
|
<View
|
|
style={{
|
|
paddingVertical: 12,
|
|
paddingHorizontal: 16,
|
|
}}
|
|
>
|
|
<Text
|
|
style={{
|
|
fontSize: 14,
|
|
fontWeight: '500',
|
|
color: textColor,
|
|
marginBottom: 8,
|
|
}}
|
|
>
|
|
{title || defaultTitle}
|
|
</Text>
|
|
{sortedEntries.map(([day, count], index) => (
|
|
<View
|
|
key={day}
|
|
style={{
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
marginBottom: 4,
|
|
}}
|
|
>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: textSecondaryColor,
|
|
flex: 1,
|
|
}}
|
|
>
|
|
{day}
|
|
</Text>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: textSecondaryColor,
|
|
fontWeight: '500',
|
|
}}
|
|
>
|
|
{count} {t('statistics.memos')}
|
|
</Text>
|
|
</View>
|
|
))}
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default WeekdayChart;
|