Files
stream.ui/src/components/ClientOnly.tsx
Mr.Dat 15b69773f0 feat: enhance icons and components for improved UI
- Updated `GlobalUploadIndicator.vue` to include `watch` for better state management.
- Modified `CoinsIcon.vue`, `Globe.vue`, and `VideoPlayIcon.vue` to support filled and outlined states.
- Added new icons: `hard-drive.vue` and `shield-user.vue`.
- Improved `AppDialog.vue` to include `ClientOnly` for hydration mismatch handling.
- Refactored `BaseTable.vue` to include `ref` for better reactivity.
- Changed route redirection in `index.ts` for better clarity.
- Enhanced `Billing.vue` and `BillingTopupDialog.vue` with new icons and improved UI elements.
- Updated `PaymentHistory.tsx` and `PlanSelection.tsx` to use new icon components.
- Refined `Settings.vue` to utilize new icons and improve layout.
- Adjusted `Upload.vue` and `Videos.vue` for better component organization and imports.
- Cleaned up `auth.ts` store to include `computed` for better state management.
- Updated `tsconfig.json` to streamline TypeScript configuration.
- Removed unnecessary console log in `vite-plugin-ssr-middleware.ts`.
2026-03-25 15:17:45 +07:00

26 lines
627 B
TypeScript

// export default defineComponent((props, context) => {
// if (typeof window === 'undefined') {
// return () => context.slots.default ? context.slots.default() : null;
// }
// return () => null;
// });
import { defineComponent, onMounted, ref } from "vue";
const ClientOnly = defineComponent({
name: "ClientOnly",
setup(_p, { slots }) {
const isClient = ref(false);
onMounted(() => {
isClient.value = true;
});
return () => {
if (isClient.value) {
return slots.default ? slots.default() : null;
}
return null;
};
},
});
export default ClientOnly;