How to align avatar in a navbar to the right?

Advertisements Here’s the navbar <nav class="navbar navbar-expand-md navbar-dark bg-dark static-top"> <button class="navbar-toggler" type="button" data-toggle="collapse"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="nav-link" href="#">item1</a> </li> <li class="nav-item"> <a class="nav-link" href="#">item2</a> </li> <li class="nav-item"> <a class="nav-link" href="#">item3</a> </li> {% if request.user.is_authenticated %} {% if request.user.is_superuser %} <li class="nav-item"> <a class="nav-link" href={% url… Read More How to align avatar in a navbar to the right?

React router with typescript how to import intrinsic attributes

Advertisements first time using Typescript, i’m rendering a component inside of a map like this: interface chatInterface { sender: string; avatar: string; content: string; time: string; } <> {eachUser?.chats.map((item) => item.messages.map((obj: chatInterface, index: number) => { return <ChatPage key={index} message={obj} />; }) )} </> And the ChatPage component is this: function ChatPage(props: { message: chatInterface… Read More React router with typescript how to import intrinsic attributes

Menu content display issue

Advertisements I need some help pls. I created a menu with section and courses; but the section-labels are repeating. I would like all courses with the same section to be displayed on a single section lable. Please see code and screenshot. <Menu defaultSelectedKeys={[clicked]} inlineCollapsed={collapsed} style={{ height: "100vh", overflow: "scroll" }} mode="inline" > {course.lessons.map((lesson, index) =>… Read More Menu content display issue

Flutter function that returns conditional does not give correct result

Advertisements I have a code like this: //… child: ListTile( leading: CircleAvatar( backgroundImage: NetworkImage("${snapshot.data!.docs[index].data()[‘urunFotografi’]}"), ), title: Text(snapshot.data!.docs[index].data()["urunAdi"], style: TextStyle(fontSize: 20),), subtitle: Text(adetVeyaKilo().toString(), style: TextStyle(fontSize: 15),), ), // … // … Future<String> adetVeyaKilo() async { String state = ""; FirebaseFirestore.instance.collection(‘bolatAktar’).where(‘urunAdi’, isEqualTo: urunAdi).get().then((value) { value.docs.forEach((element) { if (element.data()["urunBirimi"] == "Adet") { state = "Adet"; } if (element.data()["urunBirimi"]… Read More Flutter function that returns conditional does not give correct result

How to prevent sveltekit from treating my components as a route?

Advertisements As far as I understand, to create a route in sveltekit, you need to follow these rules: Create files within src/routes folder Name them according to the desired path If I need a route like https://example.com/users/:userId I need to create a [user-id].svelte file inside src/routes/users/ directory. It’s clear. But. What if I want all… Read More How to prevent sveltekit from treating my components as a route?