Skip to content

Instantly share code, notes, and snippets.

View javierguzman's full-sized avatar
🙂
Happy Coding

Francisco Javier Guzmán Jiménez javierguzman

🙂
Happy Coding
View GitHub Profile
const PrivateRoute: React.FC<PrivateRouteProps> = ({
component: Component,
requiredPermission,
logout,
...rest
}) => {
const userIsLoggedIn = useAppSelector(state => isLoggedIn(state));
const userRoles: string[] = useAppSelector(state => getRoles(state));
const { t } = useTranslation('auth');
@javierguzman
javierguzman / blog-backend-deployment.yml
Created August 1, 2022 18:15
Strapi K8S configuration
apiVersion: apps/v1
kind: Deployment
metadata:
name: blog-backend-deployment-$VERSION
spec:
replicas: 1
selector:
matchLabels:
subsystem: blog-backend-$VERSION
strategy:
@javierguzman
javierguzman / supabase.ts
Created February 26, 2023 08:58
RN notifications with supabase
// Follow this setup guide to integrate the Deno language server with your editor:
// https://deno.land/manual/getting_started/setup_your_environment
// This enables autocomplete, go to definition, etc.
import { serve } from 'https://deno.land/std@0.131.0/http/server.ts';
import { default as axiod } from 'https://deno.land/x/axiod@0.26.2/mod.ts';
import * as djwt from 'https://deno.land/x/djwt@v2.2/mod.ts';
import * as types from './types';
serve(async (req) => {