Getting data in Firebase and not a Promise [duplicate]

I have a function that shoudl return a proper object and not promise . I am calling this function which internally calls the Firebase . How can i get the details from firebase snapshot.

    function getData(tab){
    
    var data =  getDataSetFromFirebase(tab) ; 
    console.log(data);
    }
    
    
    async function getDataSetFromFirebase(tab){
       var allData = [] ; 
      var  clients = [] ; 
      const q = query(collection(db, '0M0drKmwJCWal7XHjHKuPz3rhHQ2'));
      const querySnapshot  =  await getDocs(q);
      querySnapshot.forEach(cl => {
        clients.push(cl.data()['company']);
        clients.push(cl.id);
        allData.push(clients);
        clients = [] ;
    })
    const allClientsData = await Promise.resolve(allData);
    return allClientsData; 
    }

VueJS and Axios causing ‘error during execution of scheduler flush’ and Uncaught (in promise) TypeError

So i have been poking my code for a while and found out that this error is caused specifically by this line of code:

treeNodes.value = documentStore.convertToTree((await axios.get('/File')).data);

First i get warning saying:

Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core 

and then i get this error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'parentNode')

Tried read some older threads but found nothing helpful.

Any ideas?
thanks

How to locally check functionality of HTML site with some PHP functional

So I have a site which is written in HTML CSS JS.

I also need a bit of PHP for some function (such as emailer for example).

How can i locally check if everything is working correctly?
I don’t want to upload anything yet, but I want to check if email will be sent on my inbox and parts of site will be loaded correctly.

I tried to use live and five server (VSCode extentions) and default browser to open html file itself.
On live server i have blank page http://localip:port/sendEmail.php;

On 5server i have “lost connection to dev server”.

I can’t tell if its problem php code or server itself.
Please help.

Google drive api, how to make ‘Previous page’ button work

I’ve encountered a problem, probably it’s not something huge. So basically I’m using Google Drive API to retrieve files from drive and I want to make pagination, I managed to do next page just fine, but the problem rised when I tried implementing Previous Page button. I managed to make it work, but now if there’s 2 pages it works just fine, but if there’s more than 2, for example, if there are 3 pages, if I go to 3rd page, click Previous Page button, it takes me to 2nd page, but then there’s no "previousPageToken" so button is not appearing at all. Should I store tokens in an array or something like that?
Here is the code:


let currentPageToken = null;
let previousPageToken = null;

async function listFiles(folderId, pageToken = null) {
  $('#table_content').empty();
  $('#table_content').remove();
  isListFilesInProgress = true; // Set the flag to indicate listFiles() is in progress

  // Disable the button during listFiles() execution
  $('#show_files_button').prop('disabled', true);

  const request = {
    q: `'${folderId}' in parents`,
    pageSize: 10,
    fields: 'nextPageToken, files(id, name, mimeType, thumbnailLink, webContentLink, modifiedTime)',
    pageToken: pageToken, // Pass the pageToken to retrieve the next page
  };

  gapi.client.drive.files
    .list(request)
    .then(function (response) {
      console.log(response);
      var files = response.result.files;
      if (files && files.length > 0) {
        var table = document.createElement('table');
        table.classList.add('table', 'table-striped');
        table.id = 'table_content';

        var thead = document.createElement('thead');
        var headerRow = document.createElement('tr');
        var header1 = document.createElement('th');
        header1.textContent = 'Thumbnail';
        var header2 = createSortableHeader('Name', 'name');
        var header3 = createSortableHeader('Type', 'mimeType');
        var header4 = createSortableHeader('Last Updated', 'modifiedTime');
        var header5 = document.createElement('th');
        header5.textContent = 'Download';

        headerRow.appendChild(header1);
        headerRow.appendChild(header2);
        headerRow.appendChild(header3);
        headerRow.appendChild(header4);
        headerRow.appendChild(header5);
        thead.appendChild(headerRow);
        table.appendChild(thead);

        var tbody = document.createElement('tbody');
        for (var i = 0; i < files.length; i++) {
          (function (file) {
            var fileName = file.name;
            var mimeType = file.mimeType;
            var thumbnailLink = file.thumbnailLink;
            var downloadLink = file.webContentLink;
            var lastUpdated = new Date(file.modifiedTime).toLocaleString();
            var fileId = file.id;

            var row = document.createElement('tr');

            var thumbnailCell = createThumbnailCell(thumbnailLink, mimeType, fileId);
            row.appendChild(thumbnailCell);

            var nameCell = document.createElement('td');
            nameCell.textContent = fileName;
            row.appendChild(nameCell);

            var typeCell = document.createElement('td');
            typeCell.textContent = mimeType;
            row.appendChild(typeCell);

            var lastUpdatedCell = document.createElement('td');
            lastUpdatedCell.textContent = lastUpdated;
            row.appendChild(lastUpdatedCell);

            if (mimeType != 'application/vnd.google-apps.folder') {
              var downloadCell = document.createElement('td');
              var downloadLinkElem = document.createElement('a');
              downloadLinkElem.href = downloadLink;
              downloadLinkElem.textContent = 'Download';
              downloadLinkElem.classList.add('btn', 'btn-primary');
              downloadLinkElem.target = '_blank';
              downloadCell.appendChild(downloadLinkElem);
              row.appendChild(downloadCell);
            }

            // Add click event listener to navigate into folders
            if (mimeType === 'application/vnd.google-apps.folder') {
              row.classList.add('folder-row');
              row.addEventListener('click', function () {
                var folderId = file.id;
                listFiles(folderId);
              });
            }

            tbody.appendChild(row);
          })(files[i]);
        }

        table.appendChild(tbody);
        document.getElementById('content').appendChild(table);

        // Remove existing Next Page and Previous Page buttons
        $('.next-page-button').remove();
        $('.previous-page-button').remove();

        // Add Next Page button if there is a nextPageToken
        const nextPageToken = response.result.nextPageToken;
        if (nextPageToken) {
          const nextPageButton = document.createElement('button');
          nextPageButton.textContent = 'Next Page';
          nextPageButton.classList.add('btn', 'btn-primary', 'next-page-button');
          nextPageButton.addEventListener('click', function () {
            listFiles(folderId, nextPageToken); // Call listFiles() with the nextPageToken
          });

          document.getElementById('content').appendChild(nextPageButton);
        }

        // Add Previous Page button if there is a pageToken
        if (pageToken) {
          const previousPageButton = document.createElement('button');
          previousPageButton.textContent = 'Previous Page';
          previousPageButton.classList.add('btn', 'btn-primary', 'previous-page-button');
          previousPageButton.addEventListener('click', function () {
            listFiles(folderId); // Call listFiles() without the pageToken to go back to the previous page
          });

          document.getElementById('content').appendChild(previousPageButton);
        }
      }
    })
    .finally(function () {
      isListFilesInProgress = false;
      $('#show_files_button').prop('disabled', false);
    });
}

Thank you in advance!

send message every “x” seconds

I would like to send messages every 5 seconds on differents numbers with this code:

const send_message = ["34123456789","34123456789","34123456789"];

client.on("ready", () => {
   console.log("Client is ready!");
   send_message.map((value) => {
     const chatId = value + "@c.us";
     const message = 'This is a test message';

     client.sendMessage(chatId, message);
   });
});

Where or how can I add this code to create a correct bucle?

await sleep(5000);

SyntaxError: Unexpected reserved word await in node js

I am new to node js. I am implementing one api where if the name is already there it should throw error else it should create the user. But i am getting this error. Anyone please help me with this

router.put("/", async (req, res) => {
    try {
        await Hotel.findOne({ name: req.body.name }, function (err, dupli) {
            if (err) console.log("error while checking the unique")

            else if (dupli) {
                res.status(500).json("cannot let it happend")
            } else {
                const newHotel = new Hotel(req.body)
                const saveHotel =  await newHotel.save();
                res.status(200).json(saveHotel)
            }
        })
    } catch (err) {
        console.log("error")
       // res.send(500).json(err)
    }
});

and the error is

 const saveHotel =  await newHotel.save();
                                   ^^^^^

SyntaxError: Unexpected reserved word
    at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1

trying to parse xlsx file using sheetjs but it’s not reading the entire file

const workBook = xlsx.readFile(path.resolve(__dirname, "../data/test.xlsx"));
const sheet_name_list = workBook.SheetNames;
const xlData: Array<RowData> = xlsx.utils.sheet_to_json(workBook.Sheets[sheet_name_list[0]], {raw: false});

When parsing the xlData array, it’s only loading around 50k objects whereas there should be over a million objects. Is there something i’m not considering when loading this xl file? Or do i need a different approach for larger datasets?

Create a blob from a web stream in Node.js

I am trying to pack a CAR file through ipfs-car (which uses web streams) and later send it in a request as a file but I’m not sure how to store it in a Blob after I have streamed in a WritableStream.

I have this piece of code

import { CAREncoderStream, createDirectoryEncoderStream } from 'ipfs-car'
import { WritableStream } from 'node:stream/web'

export const packCAR = async (files) => {
  const blockStream = createDirectoryEncoderStream(files)
  const carEncoderStream = new CAREncoderStream([])
  const outStream = new WritableStream()
  await blockStream.pipeThrough(carEncoderStream).pipeTo(outStream)
  const blob = new Blob(/* what do I put here? */)
}

I haven’t found anyone doing this, I only saw how to convert Blob to a stream, so help would be appreciated 🙂

axios interceptors can’t access react context

I have a context called auth and hook call useAxiosPrivate.
Inside the useAxiosPrivate hook’s useEffect console log I can see AUTH context is logged in correctly. But when the error throws and interceptor runs, auth is null inside the interceptors. How can I fix this? What could go wrong here?

Interceptors code.

import { InternalAxiosRequestConfig } from "axios";
import { useEffect } from "react";
import { privateAxiosInstance } from "../utils/axios";
import { useAuth } from "../contexts/AuthContext";

export default function useAxiosPrivate() {
  
  const auth = useAuth();
  
  
  
  useEffect(() => {
    console.log("AUTH",auth);
    const accessToken = sessionStorage.getItem("accessToken")!;
    
   
   
    const requestIntercept = privateAxiosInstance.interceptors.request.use(
      (config: InternalAxiosRequestConfig) => {
        if (config && !config?.headers?.Authorization && accessToken) {
          config.headers.Authorization = `Bearer ${accessToken}`;
        }
        return config;
      },
      (error) => Promise.reject(error)
    );

    const responseIntercept = privateAxiosInstance.interceptors.response.use(
      (response) => {
        return response;
      },
      async (error) => {
        const prevRequest = error?.config;

        // ACCESS TOKEN EXPIRED, RE-TRY WITH NEW ACCESS TOKEN
        
        console.log("AUTH INSIDE INTERCEPTORS",auth);

        if (error?.response?.status === 401 && !prevRequest?.sent) {
          console.log("1",error);
          prevRequest.sent = true;
          
          const token =  await auth?.refresh();
          

          prevRequest.headers.Authorization = `Bearer ${token}`;
          return privateAxiosInstance(prevRequest);
        } else if (error?.response?.status === 401 && prevRequest?.sent) {
          console.log("2",error);
          return auth?.logout();
        } else {
          console.log("3",error);
          
          return Promise.reject(error);
        }
      }
    );

    return () => {
      privateAxiosInstance.interceptors.request.eject(requestIntercept);
      privateAxiosInstance.interceptors.response.eject(responseIntercept);
    };
    
  }, []);

  return privateAxiosInstance;
}

Context’s code

import { createContext, useContext, useState, useEffect } from "react";
import { Auth, AuthProviderProps, AuthContextProps } from "../@types/auth";
import axiosInstance from "../utils/axios";
import { useSnackbar } from "notistack";
import useAxiosPrivate from "../hooks/useAxiosPrivate";
const AuthContext = createContext<AuthContextProps | null>(null);
AuthContext.displayName = "AuthContext";
export const useAuth = () => {
  return useContext(AuthContext);
};

export default function AuthProvider(props: AuthProviderProps) {
  const [auth, setAuth] = useState<Auth>({
    isAuthenticated: false,
    name: "",
    role: "",
    accessToken: "",
    refreshToken: "",
  });

  useEffect(() => {
    console.log("AUTH CONTEXT");
    const accessToken = sessionStorage.getItem("accessToken")!;
    const refreshToken = sessionStorage.getItem("refreshToken")!;

    if (accessToken && refreshToken) {

      setAuth((prev) => ({  isAuthenticated: true,
        name: "",
        role: "",
        accessToken,
        refreshToken, }));
    }

  }, []);

  const { enqueueSnackbar } = useSnackbar();

  const privateAxiosInstance = useAxiosPrivate();

  const login = (name: string, accessToken: string, refreshToken: string) => {
    setAuth({
      isAuthenticated: true,
      name,
      role: "",
      accessToken,
      refreshToken,
    });
    sessionStorage.setItem("accessToken", accessToken);
    sessionStorage.setItem("refreshToken", refreshToken);

      privateAxiosInstance.get("/users/me",{
        headers: {
          authorization: "Bearer " + accessToken,
        },
      }).then((res) => {
      const { name } = res.data.user;
      setAuth((prev) => ({ ...prev, name: name }));
    });
  };

  const logout = () => {
    const refreshToken = sessionStorage.getItem("refreshToken")!;

    sessionStorage.removeItem("accessToken");
    sessionStorage.removeItem("refreshToken");

    axiosInstance.post(
      "/logout",
      {
        refreshToken: refreshToken,
      },
      {
        headers: {
          Authorization: Date.now(),
        },
      }
    );

    enqueueSnackbar("sessiontimeout Logged out due to session expired", {
      variant: "error",
    });
    setAuth({
      isAuthenticated: false,
      name: "",
      role: "",
      accessToken: "",
      refreshToken: "",
    });
    window.location.href = "/";
  };

  const refresh = async () => {
    try {
      console.log("refreshing");
      if (!auth.refreshToken) {
        throw new Error("Refresh token not found!");
      }

      const { data } = await axiosInstance.post(
        "/accessToken",
        {
          refreshToken: auth.refreshToken,
        },
        {
          headers: {
            Authorization: Date.now(),
          },
        }
      );

      sessionStorage.setItem("accessToken", data.accessToken);
      setAuth((prev) => ({ ...prev, accessToken: data.accessToken }));
        
      return data.accessToken;
    } catch (error) {
      logout();
    }
  };

  const setName = (name: string) => {
   
    setAuth((prev) => ({ ...prev, name: name }));
  };

  return (
    <AuthContext.Provider value={{ auth, login, logout, refresh, setName }}>
      {props.children}
    </AuthContext.Provider>
  );
}

Getting undefined when trying to get parent field attribute

Initially, I had one button to upload a photo

She looked like this, and the script for uploading specifically for this id

<div class="field">
    <label>Photos</label>
    <div class="field_info" data-field_photo_id="5">
        <div class="value" data-item_id=""></div>
    </div>
    <div class="field_form">
        <a class="btn btn-dark btn-md btnUpload" href="#">
            <i class="fa fa-cloud-upload"></i> Upload
        </a>
        <div id="dz_params_field_photo" 
            data-type="pipeline" data-entity_id="11" 
            style="display: none">
        </div>
        <div id="dz_field_photo_uploaded"></div>
    </div>
</div>

But then I needed to make several of these download buttons, and each button should have its own download

I’ve added these buttons so that I don’t have to make a separate script for each button, I’m trying to tag them with different IDs so that one script can be used

But I have a problem in the script itself, specifically in getting the values ​​of data attr from html

This is not a complete script, I shortened it as much as possible for demonstration, otherwise I usually used the script to download from the dropzone, and the ID was indicated there at the beginning of initialization, but now I need to separately receive the ID for each button

And here I have a problem, I try to get data-field_photo_id from the field_info field but I get undefined, and for some reason it turns out for any attribute of any field

(function($){
    $.dispatcherFiles = {
        $filesDropzone: null,
        $parallelUploads: 100,
        $maxFiles: 10,
        $files: [],

        cacheDom: function(){
            this.$body = $('body');
        },

        functions: {
            uploadFiles: function (e) {
                let field = $(e.currentTarget).closest('field').find('field_info');
                let photoID = $(e.currentTarget).closest('field').find('field_info').attr('data-field_photo_id');
                console.log(field);
                console.log(photoID);
            },
        },

        events: function(){
            this.$body.on('click', '.field .field_form .btnUpload', this.functions.uploadFiles.bind(this));
        },

        init: function () {
            this.cacheDom();
            this.events();
        }
    };

    $.dispatcherFiles.init();

})(jQuery);
.field {
  margin: 50px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"  rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"  crossorigin="anonymous">
<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css" 
  rel="stylesheet"  type='text/css'>

<div class="field">
    <label>Photos</label>
    <div class="field_info" data-field_photo_id="5">
        <div class="value" data-item_id=""></div>
    </div>
    <div class="field_form">
        <a class="btn btn-dark btn-md btnUpload" href="#">
            <i class="fa fa-cloud-upload"></i> Upload
        </a>
        <div id="dz_params_field_photo_5" 
            data-type="pipeline" data-entity_id="11" 
            style="display: none">
        </div>
        <div id="dz_field_photo_5_uploaded"></div>
    </div>
</div>

<div class="field">
    <label>Photos</label>
    <div class="field_info" data-field_photo_id="6">
        <div class="value" data-item_id=""></div>
    </div>
    <div class="field_form">
        <a class="btn btn-dark btn-md btnUpload" href="#">
            <i class="fa fa-cloud-upload"></i> Upload
        </a>
        <div id="dz_params_field_photo_6" 
            data-type="pipeline" data-entity_id="12" 
            style="display: none">
        </div>
        <div id="dz_field_photo_6_uploaded"></div>
    </div>
</div>

<div class="field">
    <label>Photos</label>
    <div class="field_info" data-field_photo_id="7">
        <div class="value" data-item_id=""></div>
    </div>
    <div class="field_form">
        <a class="btn btn-dark btn-md btnUpload" href="#">
            <i class="fa fa-cloud-upload"></i> Upload
        </a>
        <div id="dz_params_field_photo_7" 
            data-type="pipeline" data-entity_id="13" 
            style="display: none">
        </div>
        <div id="dz_field_photo_7_uploaded"></div>
    </div>
</div>

How can I dynamically rearrange elements in a list using HTML, JavaScript, and CSS?

Проблема такая: я хочу создать некий список в котором можно менять местами элементы этого самого списка.

В коде стандартная констукция html, и соответсвующие стили css
Код:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="css/style.css">
  <title>Document</title>
</head>
<body>

    <div class="wrapper">
        <div class="first"><span>1</span></div>
        <div class="second"><span>2</span></div>
        <div class="third"><span>3</span></div>
        <div class="fourth"><span>4</span></div>
    </div>
    
  <!-- <script src="js/01_binary_search.js"></script> -->
  <script src="js/script.js"></script>
</body>
</html>```

html{
    background-color: black;
    color: white;
}

.wrapper{
    max-width: 960px;
    margin: 0 auto;
    background-color: gray;
    padding: 30px;
    border-radius: 4px;
    display: flex;
    flex-flow: column nowrap;

}

.wrapper div{
    padding: 20px;
    border-radius: 10px;
    background: #DDD;
    color: black;
    margin: 20px;
    display: flex;
    justify-content: flex-end;
    transition: 1s;
}

.wrapper span{
    display: block;
    margin-right: auto;
}

.wrapper div:nth-child(1){
    order: 1;
    background: blue;
}

.wrapper div:nth-child(2){
    order: 2;
    background: red;
}

.wrapper div:nth-child(3){
    order: 3;
    background: peru;
}

.wrapper div:nth-child(4){
    order: 4;
    background: violet;
}



let items = document.querySelectorAll('.wrapper div')

for (let i = 0; i < items.length; i++) {
    items[i].insertAdjacentHTML(
        'beforeend',
        '<button class="one">1</button> <button class="two">2</button> <button class="three">3</button> <button class="four">4</button>'
    )
}

let oneButton = document.querySelectorAll('.one')
let twoButton = document.querySelectorAll('.two')
let threeButton = document.querySelectorAll('.three')
let fourButton = document.querySelectorAll('.four')





for (let i = 0; i < oneButton.length; i++) {
  oneButton[i].addEventListener('click', order1)
}

function order1(event) {
    if(event.target.closest('.first')){
        items[0].style.order = '1'
    }

    else if(event.target.closest('.second')){
    items[1].style.order = '1'
    }

    else if(event.target.closest('.third')){
        items[2].style.order = '1'
    }

    else if(event.target.closest('.fourth')){
    items[3].style.order = '1'
    }
}


for (let i = 0; i < twoButton.length; i++) {
  twoButton[i].addEventListener('click', order2)
}

function order2(event) {
    if(event.target.closest('.first')){
        items[0].style.order = '2'
    }

    else if(event.target.closest('.second')){
    items[1].style.order = '2'
    }

    else if(event.target.closest('.third')){
        items[2].style.order = '2'
    }

    else if(event.target.closest('.fourth')){
    items[3].style.order = '2'
    }
}


for (let i = 0; i < threeButton.length; i++) {
  threeButton[i].addEventListener('click', order3)
}

function order3(event) {
    if(event.target.closest('.first')){
        items[0].style.order = '3'
    }

    else if(event.target.closest('.second')){
    items[1].style.order = '3'
    }

    else if(event.target.closest('.third')){
        items[2].style.order = '3'
    }

    else if(event.target.closest('.fourth')){
    items[3].style.order = '3'
    }
}


for (let i = 0; i < fourButton.length; i++) {
  fourButton[i].addEventListener('click', order4)
}

function order4(event) {
    if(event.target.closest('.first')){
        items[0].style.order = '4'
    }

    else if(event.target.closest('.second')){
    items[1].style.order = '4'
    }

    else if(event.target.closest('.third')){
        items[2].style.order = '4'
    }

    else if(event.target.closest('.fourth')){
    items[3].style.order = '4'
    }
}

Я использовал свойство order, но результат отличается от моих желений, я думаю это можно сделать с помощью условных операторов, но я также надеюсь, что есть более элегантное решение

Need help modifying regex to mathc only needed strings but not others

Help me figure this regex out.

I have this regex currently /(?<=^|/)(?:(?!/)(?!.*/))(.*?)[:-]v([d.-]+)(?=.|$)/

It should result in the captured group fro these strings:

rhmtc/openshift-velero-plugin-rhel8:v1.7.9-4
oc-mirror-plugin-container-v4.13.0-202305091542.p0.gbee629a.assembly.stream
openshift4/ose-cluster-ingress-operator:v4.7.0-202208021424.p0.ge76561d.assembly.stream
container-native-virtualization/hco-bundle-registry-rhel9:v4.13.0.rhel9-2172

It should get me the name and the version separately like:
name : openshift-velero-plugin-rhel8, version: 1.7.9-4

or:
name :oc-mirror-plugin-container, version: 4.13.0

I needed to add the possibility of this string to be matched by the regex:
oadp/oadp-velero-plugin-for-aws-rhel8:1.0.4-5

So i thought of changing the regex to /(?<=^|/)(?:(?!/)(?!.*/))(.*?)[:-]v?([d.-]+)(?=.|$)/

BUT now this string gets matched: openssl-1:1.1.1k-9.el8_7
And I dont want that.

Help me figure this out please..

changing the capture groups didnt work as well as excluding everything that matched -d:

Why css border-radius is causing element to disappear in this bare minimum Angular Material Sidenav conponent? (demo provided)

This is regarding Angular Material Sidenav component. In the below code, when I increase the border-radius so that when it overlaps the enclosing element, the element disappears.

<mat-drawer-container class="example-container">
  <mat-drawer mode="side" opened>
    Drawer content <br />
  </mat-drawer>
  <mat-drawer-content
    style="
      border-radius: 0px; // <-- try to increase this value to see effect
      display: flex;
      flex-direction: column;
      justify-content: stretch;
      align-items: stretch;
      background-color: rgb(255, 200, 200);
    "
    >Main content</mat-drawer-content>
</mat-drawer-container>

(content visible when no border radius)
enter image description here

(content vanishes when border radius is added)
enter image description here

Stackblitz: https://stackblitz.com/edit/7swnhp?file=src%2Fexample%2Fsidenav-drawer-overview-example.html

I couldn’t see where the element goes, couldn’t see any hiding styles being applied, in the DOM I can see it is there, but it is not visible.

Need help creating animation on scroll down

I’m not proficient in animation. I want to create some animation on scroll down.
So could someone suggest to me?

I tried is svg path, not ok.
What I want is when the visitor is scroll down, the images will be move on the curved, the invisible images will be also show and move, like circle.

Could someone suggest to me how can I create for this? and example?

enter image description here