Skip to content

Instantly share code, notes, and snippets.

View stephyswe's full-sized avatar
👋
not busy

Stephanie stephyswe

👋
not busy
  • Sweden, Gothenburg
View GitHub Profile
{
"name": "diffuse",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "yarn start",
"compile": "electron-webpack",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
"test": "jest"
/* eslint-disable @typescript-eslint/ban-ts-comment */
import GoogleMapReact from 'google-map-react';
import { useRef, useState } from 'react';
import { GOOGLE_API } from '@/lib/env';
import { useOnClickOutside } from '@/hooks/useOutsideDiv';
import { Link } from '@/components';
import { useDelivery } from '@/contexts/delivery';
make better`
```
const DataComponent = ({ data, onClick }) => (
<>
{Object.keys(data).map((key, index) => {
return (
<tr key={index}>
<td>{key}</td>
{onClick
? beloppValuesOnClick(data)[index].map((belopp, innerIndex) => (
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "input.h"
typedef enum {
Calculator_Status_Ok = 0,
Calculator_Status_InvalidInput = 1,
Calculator_Status_DivideByZero = 2
#include <gtest/gtest.h>
extern "C" {
#include "input.h"
#include "shapes.h"
}
class ShapesTest : public testing::Test {
protected:
// Override this to define how to set up the environment.
@stephyswe
stephyswe / PlayerContent.tsx
Last active June 12, 2023 15:31
track length and spotify design
"use client";
import { useEffect, useRef, useState } from "react";
import { AiFillStepBackward, AiFillStepForward } from "react-icons/ai";
import { BsPauseFill, BsPlayFill } from "react-icons/bs";
import { HiSpeakerWave, HiSpeakerXMark } from "react-icons/hi2";
import useSound from "use-sound";
import Slider from "@/components/Slider";
import SliderTrack from "@/components/SliderTrack";
@stephyswe
stephyswe / Slider.tsx
Last active June 12, 2023 15:32
spotify design
"use client";
import * as RadixSlider from "@radix-ui/react-slider";
interface SlideProps {
value?: number;
onChange?: (value: number) => void;
max?: number;
}
@stephyswe
stephyswe / SliderTrack.tsx
Created June 12, 2023 15:31
SliderTrack.tsx - works fine
"use client";
import * as RadixSlider from "@radix-ui/react-slider";
interface SlideProps {
value?: number;
onChange?: (value: number) => void;
max?: number;
}
@stephyswe
stephyswe / PlayerContent.tsx
Created June 12, 2023 16:08
PlayerContent, (upd) only update sound when thumb is inactive
"use client";
import { useEffect, useRef, useState } from "react";
import { AiFillStepBackward, AiFillStepForward } from "react-icons/ai";
import { BsPauseFill, BsPlayFill } from "react-icons/bs";
import { HiSpeakerWave, HiSpeakerXMark } from "react-icons/hi2";
import useSound from "use-sound";
import Slider from "@/components/Slider";
import SliderTrack from "@/components/SliderTrack";
@stephyswe
stephyswe / dialog.tsx
Last active July 2, 2023 06:27
two files, dialog.tsx (parent), modal.tsx (child)
import * as DialogPrimitive from "@radix-ui/react-dialog";
import * as React from "react";
import { cn } from "@/lib/utils";
const defaultClasses = {
overlay:
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
content:
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",